﻿#if($msg)
<script>
alert('$!msg');
</script>
#end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>编辑模板</title>
<link href="/include/manage/images/main/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="/include/manage/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="/edit_area/edit_area_full.js"></script>
<script language="javascript" type="text/javascript">
editAreaLoader.init({
	id : "editcontent",
	language : "zh",
	syntax: "html",
	plugins: "charmap",
	toolbar: "save,|,go_to_line,search,|,undo,redo,|,change_smooth_selection,|,reset_highlight,highlight,|,charmap",
	allow_toggle: false,
	start_highlight: true,
	word_wrap:true,
	save_callback : "saveTemplate"
});

function saveTemplate(id,adata){
	//document.getElementById("content").value=data;
	//TemplateForm.submit();
	jQuery.post("/manage_template_ajax.ad",{parameter:'save',id:'$!tid',name:'$!name',content:adata},function(data){
		if(data.length>0){
			alert(data);
		}
	});
}
</script>
</head>
<body>
<div style="margin:2px;overflow:hidden">
<form name="TemplateForm" id="TemplateForm">
	<textarea id="editcontent" name="editcontent" style="width:100%;height:100%">#if($content)$!content#else//KnifeCMS模板#end</textarea>
</form>
</div>
</body>
</html>